
1. Preparation and purchase: Choose a suitable lightweight application server
1) Log in to Tencent Cloud Console → Lightweight Application Server → Select the region as "Singapore".
2) Select CPU/RAM/bandwidth based on traffic and concurrency (small and medium-sized enterprises recommend starting with 1–2 cores, 2–4GB memory, and bandwidth 1–3Mbps), and choose pay-per-use or annual and monthly billing.
3) Select the image (Ubuntu 22.04 or CentOS 7/8 is recommended), configure the public IP and system disk size, submit the order and pay after confirmation.
2. Obtain login information and access the console for the first time
1) After the purchase is completed, check the public IP, default user name (ubuntu for Ubuntu, root for CentOS) and initial login method in the instance details.
2) If you use a password to log in, it is recommended to set up a key pair (SSH Key) on the console and disable password login to improve security.
3. Use SSH to log in to the server (Windows/Mac/Linux)
1) Mac/Linux: Open the terminal ssh ubuntu@server IP; Windows: It is recommended to use PuTTY or Windows Terminal.
2) If using a key, chmod 600 private key.pem, then ssh -i private key.pem ubuntu@IP. It is recommended to execute sudo apt update && sudo apt upgrade (Ubuntu) or sudo yum update (CentOS) when logging in for the first time.
4. Basic security configuration (strongly recommended to complete immediately)
1) Create a new user and join the sudo group: sudo adduser username && sudo usermod -aG sudo username.
2) Disable root password login: edit /etc/ssh/sshd_config, change PermitRootLogin no, PasswordAuthentication no, save and sudo systemctl restart sshd.
3) Configure the firewall: Ubuntu uses ufw, execute sudo ufw allow OpenSSH && sudo ufw enable; or allow 22/80/443 ports in the Tencent Cloud console security group.
5. Environment installation: choose LEMP (Nginx) or LAMP (Apache)
1) Install Nginx + PHP + MySQL (Ubuntu as an example): sudo apt install nginx mariadb-server php-fpm php-mysql -y.
2) Start and set up auto-start at boot: sudo systemctl enable --now nginx mariadb php7.4-fpm (adjusted according to PHP version).
6. MySQL/MariaDB initial security and database creation
1) Run sudo mysql_secure_installation, follow the prompts to set the root password, delete anonymous users, and prohibit remote root.
2) Log in mysql -u root -p, create site library and user: CREATE DATABASE mysite; CREATE USER 'siteuser'@'%' IDENTIFIED BY 'strong password'; GRANT ALL ON mysite.* TO 'siteuser'@'%'; FLUSH PRIVILEGES;
7. Deploy website files and permission management
1) It is recommended to use git or rsync deployment: create the website directory /var/www/mysite on the server and set the owner sudo chown -R username:www-data /var/www/mysite.
2) If you use FTP/SFTP, it is recommended to configure vsftpd through the sftp user or restrict the directory.
8. Configure Nginx virtual host and PHP parsing
1) Create mysite.conf in /etc/nginx/sites-available, set server_name to fill in the domain name, root points to /var/www/mysite, configure location / and php processing (fastcgi_pass unix:/run/php/php7.4-fpm.sock).
2) sudo ln -s /etc/nginx/sites-available/mysite.conf /etc/nginx/sites-enabled && sudo nginx -t && sudo systemctl reload nginx.
9. Domain name resolution and validity detection
1) Add an A record in the domain name registrar or DNS service (Tencent Cloud DNSPod), fill in @ or www for the host record, fill in the server public IP for the record value, and TTL can be set to 600.
2) Use nslookup domain name or dig +short domain name to check whether the resolution points to the server IP. It may take several minutes to hours for the resolution to take effect.
10. Configure HTTPS (Let's Encrypt) and automatic renewal
1) Install certbot: sudo apt install certbot python3-certbot-nginx -y.
2) Execute sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com, follow the prompts to complete the verification and automatically modify the Nginx configuration.
3) Verify automatic renewal: sudo certbot renew --dry-run, and add it to cron (it will be added by the system).
11. Backup strategy: practical operation of file and database backup
1) Use rsync to synchronize files to another server or cloud storage: rsync -avz /var/www/mysite/ backup@Backup server IP:/backup/mysite.
2) Use mysqldump for the database: mysqldump -u siteuser -p mysite > /root/backup/mysite_$(date +%F).sql, execute it regularly with crontab and upload it to the object storage COS.
12. Performance and monitoring optimization suggestions
1) Enable Gzip, static resource acceleration and browser caching, add gzip on and expires to Nginx configuration; enable HTTP/2.
2) Use Tencent Cloud Monitoring or a third party (Prometheus/Grafana) to monitor CPU, memory, bandwidth and configure alarms; bandwidth can be temporarily upgraded or model changed for peak traffic.
13. Question: Is the Singapore lightweight server suitable for delaying Chinese websites?
Answer: The Singapore node has better latency for access to Southeast Asia, Hong Kong and southern China, but access to the north of the country may be slightly higher. If it is mainly for users in mainland China, it is recommended to combine CDN (Tencent Cloud CDN) + domestic acceleration nodes or choose a region close to the target users; test method: After purchasing the trial, use ping/traceroute to compare with a loading test tool (such as GTmetrix).
14. Question: How to ensure stable operation and backup at the lowest cost?
Answer: Using the annual package can save costs; put static resources into object storage COS and combine it with CDN to reduce server bandwidth pressure; use lightweight instances for front-end applications, and use managed databases or regular snapshots + external backup for the database; combine automatic snapshots with daily mysqldump uploads to COS to achieve low-cost off-site backup.
15. Question: What are the common problems and troubleshooting procedures?
Answer: Common problems include port 80/443 not being opened (check security group and ufw), domain name not being resolved (checking A record and TTL), certificate application failure (confirming that domain name has been resolved and HTTP can be accessed), database connection error (checking user, password and firewall). Troubleshooting sequence: check the service status (systemctl status), check the logs (/var/log/nginx/error.log, php-fpm log, mysql log), use curl local request to verify the configuration, and check each item one by one.
- Latest articles
- A Collection Of Performance Optimization Tips For Developers To Choose Cloud Servers From Alibaba Cloud Vietnam
- How To Perform Performance Verification And Security Reinforcement After Purchasing Hong Kong High-defense Servers
- Deployment Recommendations Native IP Taiwan Combination Strategy In CDN And Acceleration Solutions
- Industry Cases: Acceleration Effect Of Japan’s Overseas Cloud Servers In Media Releases
- Long-term And Stable Hong Kong Native IP Ladder Free Access Channels And Update And Maintenance Suggestions
- Tencent Cloud's Lightweight Singapore Server Quick Start Guide Is Suitable For Small And Medium-sized Enterprises And Individual Webmasters
- Comparison Of Network Optimization And Acceleration Services Supported By Hong Kong And Taiwan Cloud Servers
- Case Study On How To Use Vietnamese Native IP Nodes To Improve Mobile Response Speed
- Does Huawei Cloud Have Korean Servers? An In-depth Explanation Of The Latest Node Coverage And Bandwidth Costs
- How To Choose A Japanese Line Cn2 Transfer Node Suitable For Enterprises And Cost Assessment
- Popular tags
-
Cheap Vps In Singapore: How To Find The Most Cost-effective Option
this article explores how to find the most cost-effective cheap vps in singapore, especially recommending the service of dexun telecom. -
Singapore Cloud Server Trial Guide And Precautions
this article provides trial strategies and precautions for singapore cloud servers, and recommends dexun telecommunications as a high-quality service provider. -
Performance Analysis Of Tencent Light Cloud Servers In Singapore For Deploying Small And Medium-Sized Websites
Analyze the suitability of Tencent Light Cloud Server (Singapore node) for deploying small and medium-sized websites, provide performance test data, real migration cases, configuration recommendations, as well as CDN and DDoS protection strategies, and offer cost-effectiveness insights and optimization measures.